import { WebMapTileServiceImageryProvider, Viewer, ImageryLayer } from 'cesium'

const subdomains = ['0', '1', '2', '3', '4', '5', '6', '7']
const vecAnnoProvider = new WebMapTileServiceImageryProvider({
  url: import.meta.env.VITE_VEC_ANNOPROVIDER as string,
  subdomains: subdomains,
  layer: 'tdtVecAnnoLayer',
  style: 'default',
  format: 'image/jpeg',
  tileMatrixSetID: 'GoogleMapsCompatible',//使用谷歌的瓦片切片方式
  maximumLevel: 18,
})
let annoLayer: ImageryLayer

const viewerOptions = {
  imageryProvider: new WebMapTileServiceImageryProvider({
    url: import.meta.env.VITE_IMG_PROVIDER as string,
    subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'],
    layer: 'tdtVecLayer',
    style: 'default',
    format: 'image/jpeg',
    tileMatrixSetID: 'GoogleMapsCompatible',//使用谷歌的瓦片切片方式
    maximumLevel: 18,
  }),

  terrainProvider: undefined,
  terrainProviderViewModels: [],
} as Viewer.ConstructorOptions
export { viewerOptions, vecAnnoProvider }
